﻿
using System.ComponentModel.DataAnnotations.Schema;
using System.IO.Pipes;
using System.Reflection.Emit;
using System.Text.Json.Serialization;
using ZhiJiao.Models.Entities;

namespace ZhiJiao.Models.Entities
{
    /// <summary>
    /// 问题
    /// </summary>
    [Table("Questions")]
    public class Question : BaseEntity
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int Number { get; set; }

        /// <summary>
        /// 内容(用于单选、多选、问答)
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 所属测评模块
        /// </summary>
        [JsonIgnore]
        public EvaluationPart EvaluationPart { get; set; }

        /// <summary>
        /// 测评模块Id
        /// </summary>
        public long EvaluationPartId { get; set; }

        /// 问题类型
        /// </summary>
        public QuestionType QuestionType { get; set; }

        /// <summary>
        /// 选项
        /// </summary>
        [JsonIgnore]
        public List<Option>? Options { get; set; }

        /// <summary>
        /// 分数
        /// </summary>
        public int Score { get; set; }


        /// <summary>
        /// 答案(单选或多选)
        /// </summary>
        [JsonIgnore]
        public List<Option>? Result { get; set; }
    }
}
